import {createRouter, createWebHashHistory, Router} from 'vue-router'


const routes = [
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/views/login.vue'),
        meta: {title: '登录'}
    },
    {
        path: '/',
        name: 'Home',
        redirect: '/map',
        component: () => import('@/views/home.vue'),
        children: [
            {
                path: '/map',
                component: () => import('@/views/menu/SiteViewer.vue'),
                meta: {title: '地图模式'},
            }, {
                path: '/table',
                component: () => import('@/views/menu/TablePanel.vue'),
                meta: {title: '经典模式'},
            },
        ]
    }
]

const router: Router = createRouter({
    history: createWebHashHistory(),
    routes,
})
export default router
